//
//  TabBar.h
//  BaiduTravel
//
//  Created by guantianpeng on 13-5-10.
//  Copyright (c) 2013年 Baidu.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TabItem.h"

@protocol TabBarDelegate <NSObject>

- (void)didSelectTabBar:(int)index;

@optional
- (void)didUnselectTabBar:(int)index;

@end

@interface TabBar : UIView <TabItemDelegate>{
    NSMutableArray *_tabItems;
    UIImage        *_imgItemLine;
}

@property(nonatomic, assign) id<TabBarDelegate> tabBarDelegate;
@property(nonatomic, assign) NSInteger selectedIndex;

- (id)initWithFrame:(CGRect)frame tabBarTitles:(NSArray *)titles;

- (void)clearState;
- (void) setTitleName:(NSString *) titleName forTabIndex:(NSInteger) index;
@end
